package 基础.static_;
class A{
    //静态方法不依赖对象
    static int x = 100;
    int y  =10;
    public static void fun1(){
        x++;
        System.out.println(x);
//        y++;//错误，y是非静态变量
//        System.out.println(y);
    }
    public static void hello(){
        System.out.println("hello");
    }
}
public class Static_2 {
    public static void main(String[] args) {
        A a = null;//没有指向任何对象
        a.hello();//hello
        //A.hello();
    }
}
